package com.biwano.swapmyjob.beans.application;

import java.util.ArrayList;
import java.util.List;

import javax.ejb.EJB;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;

import com.biwano.swapmyjob.beans.BaseBean;
import com.biwano.swapmyjob.dao.JobTypeDao;
import com.biwano.swapmyjob.objects.JobExchange.EXPERIENCE;


@ManagedBean
@ApplicationScoped
public class ExperienceBean extends BaseBean{
	
	@EJB
	JobTypeDao jobTypeDao;
	
	List<EXPERIENCE> list;

	public List<SelectItem> getList() {
	    List<SelectItem> resultList = new ArrayList<SelectItem>();
	    for (EXPERIENCE it : EXPERIENCE.values()){
	        SelectItem item = new SelectItem(it, getLabelText("listExperience",it.name())); 
	        resultList.add(item);
	    }
	    return resultList;
	}

	public void setList(List<EXPERIENCE> list) {
		this.list = list;
	}
	
	
}
